﻿capital = 10

oob = "POL_1936"
if = {
	limit = { has_dlc = "Man the Guns" }
		set_naval_oob = "POL_1936_naval_mtg"
	else = {
		set_naval_oob = "POL_1936_naval_legacy"
	}
}
if = {
	limit = { has_dlc = "By Blood Alone" }
		set_air_oob = "POL_1936_air_bba"
		set_technology = {
			aa_lmg = 1
			aa_cannon_1 = 1
			iw_small_airframe = 1
			basic_small_airframe = 1
			engines_1 = 1
			early_bombs = 1
		}
	else = {
		set_air_oob = "POL_1936_air_legacy"
		set_technology = {
			early_fighter = 1
			early_bomber = 1
			CAS1 = 1
		}
	}
}

set_research_slots = 3

# Starting tech
set_technology = {
	infantry_weapons = 1
	infantry_weapons1 = 1
	tech_mountaineers = 1
	tech_trucks = 1
	tech_support = 1		
	tech_engineers = 1
	tech_recon = 1
	gw_artillery = 1
	interwar_antiair = 1
	trench_warfare = 1
	fuel_silos = 1
	synth_oil_experiments = 1
	basic_train = 1
}

if = {
	limit = {
		NOT = { has_dlc = "No Step Back" }
	}
	set_technology = {
		gwtank = 1
	}
}
if = {
	limit = {
		has_dlc = "No Step Back"
	}
	set_technology = {
		gwtank_chassis = 1
	}
}
if = {
	limit = { not = { has_dlc = "Man the Guns" } }
	set_technology = {
		early_destroyer = 1
		early_submarine = 1	
	}
}
if = {
	limit = { has_dlc = "Man the Guns" }
	set_technology = {
		basic_naval_mines = 1
		submarine_mine_laying = 1
		early_ship_hull_light = 1
		early_ship_hull_submarine = 1
		basic_ship_hull_submarine = 1
		basic_battery = 1
		basic_torpedo = 1
		basic_depth_charges = 1
	}
}
if = {
	limit = { has_dlc = "No Step Back" }
	set_variable = {
		var = pol_peasant_democracy
		value = 30
	}
	set_variable = {
		var = pol_peasant_communism
		value = 30
	}
}

if = {
	limit = {
		has_dlc = "Poland: United and Ready"
	}
	add_ideas = {
		uncontrolled_exports
		POL_april_constitution_1
		POL_looming_peasants_strike
		POL_sanation_left_opposition_1
		POL_sanation_right_opposition_1
	}
}


85 = {
	add_dynamic_modifier = { modifier = international_city }
}

1939.1.1 = {
	
	if = {
		limit = {
			has_dlc = "Poland: United and Ready"
		}

		complete_national_focus = POL_central_region_strategy
		complete_national_focus = POL_expansion_of_new_towns
		complete_national_focus = POL_start_central_industrial_region
		complete_national_focus = POL_fill_the_railways_gaps
		complete_national_focus = POL_plan_west
		complete_national_focus = POL_new_military_academy
		unlock_national_focus = POL_the_four_year_plan
		complete_national_focus = POL_national_defence_fund
		complete_national_focus = POL_warsaw_main_railway_station
		complete_national_focus = POL_invest_in_the_old_polish_region
		complete_national_focus = POL_additional_research_slot1
		complete_national_focus = POL_army_modernisation
		complete_national_focus = POL_modernize_congressional_factories
		unlock_national_focus = POL_prepare_for_the_next_war
		unlock_national_focus = POL_standardisation_of_equipment
		unlock_national_focus = POL_modernising_the_cavalry

		complete_national_focus = POL_hel_fortified_area
		complete_national_focus = POL_silesia_fortified_area

		complete_national_focus = POL_air_base_expansion 
		complete_national_focus = POL_develop_polish_ship_building 

		complete_national_focus = POL_complete_april_constitution
		complete_national_focus = POL_polish_militarism
		complete_national_focus = POL_consolidate_sanation_government

		remove_ideas = POL_looming_peasants_strike
	}

	add_political_power = 1198
	add_command_power = 100
	
	#generic focuses
	complete_national_focus = army_effort
	complete_national_focus = equipment_effort
	complete_national_focus = motorization_effort
	complete_national_focus = aviation_effort
	complete_national_focus = naval_effort
	complete_national_focus = flexible_navy
	complete_national_focus = industrial_effort
	complete_national_focus = construction_effort
	complete_national_focus = production_effort


	add_ideas = {
		#laws
		limited_conscription
		partial_economic_mobilisation
	}
	if = {
		limit = {
			NOT = { has_dlc = "Poland: United and Ready" }
		}
		add_ideas = {
			#laws
			limited_exports
		}
	}


	
	if = {
		limit = { has_dlc = "Man the Guns" }
			set_naval_oob = "POL_1939_naval_mtg"
		else = {
			set_naval_oob = "POL_1939_naval_legacy"
		}
	}
	if = {
		limit = { has_dlc = "By Blood Alone" }
			set_air_oob = "POL_1939_air_bba"
			set_technology = {
				iw_medium_airframe = 1
				basic_medium_airframe = 1
				engines_2 = 1
				improved_small_airframe = 1
				bba_early_transport_plane = 1
			}
		else = {
			set_air_oob = "POL_1939_air_legacy"
			set_technology = {
				tactical_bomber1 = 1
				early_transport_plane = 1
			}
		}
	}

	set_technology = {
		motorised_infantry = 1
		support_weapons = 1
		interwar_artillery = 1

		#doctrines
		air_superiority = 1
		grand_battle_plan = 1
		trench_warfare = 1
		fleet_in_being = 1
		battlefleet_concentration = 1
		convoy_sailing = 1

		#electronics
		electronic_mechanical_engineering = 1
		radio = 1
		mechanical_computing = 1
		computing_machine = 1

		#industry
		basic_machine_tools = 1
		improved_machine_tools = 1
		advanced_machine_tools = 1
		synth_oil_experiments = 1
		fuel_silos = 1
		oil_processing = 1
		improved_oil_processing = 1
		construction1 = 1
		construction2 = 1
		construction3 = 1
		construction4 = 1
		concentrated_industry = 1
		concentrated_industry2 = 1
		concentrated_industry3 = 1
		concentrated_industry4 = 1
	}
	complete_special_project = {
		project = sp:sp_air_radar
	}
	if = {
		limit = {
			NOT = {
				has_dlc = "No Step Back"
			}
		}
		set_technology = {
			basic_light_tank = 1
		}
		set_oob = "POL_1939"
	}
	if = {
		limit = {
			
			has_dlc = "No Step Back"
			
		}
		set_technology = {
			basic_light_tank_chassis = 1
		}
		set_oob = "POL_1939_nsb"
	}
	if = {
		limit = { not = { has_dlc = "Man the Guns" } }
		set_technology = {
			basic_submarine = 1
			basic_destroyer = 1
		}
	}
	if = {
		limit = { has_dlc = "Man the Guns" }
		set_technology = {
			basic_ship_hull_light = 1
			basic_light_battery = 1
		}
	}
	if = {
		limit = {
			NOT = { has_dlc = "By Blood Alone" }
		}
		create_equipment_variant = {
			name = "PZL P.43"
			type = CAS_equipment_1
			upgrades = {
					plane_cas_upgrade = 0
					plane_range_upgrade = 1
					plane_engine_upgrade = 2
					plane_reliability_upgrade = 1
			}
		}
	}
	if = {
		limit = {
			has_dlc = "By Blood Alone"
		}
		create_equipment_variant = {
			name = "PZL P.43"
			type = small_plane_cas_airframe_1
			modules = {
				fixed_main_weapon_slot = bomb_locks
				fixed_auxiliary_weapon_slot_1 = light_mg_2x
				engine_type_slot = engine_1_1x
				special_type_slot_1 = empty
			}
			obsolete = yes
		}
		create_equipment_variant = {
			name = "PZL P.37"
			type = medium_plane_airframe_1
			modules = {
				fixed_main_weapon_slot = medium_bomb_bay
				fixed_auxiliary_weapon_slot_1 = medium_bomb_bay
				engine_type_slot = engine_2_2x
				special_type_slot_1 = lmg_defense_turret
			}
		}
		create_equipment_variant = {
			name = "PZL P.46"
			type = small_plane_cas_airframe_2
			modules = {
				fixed_main_weapon_slot = bomb_locks
				fixed_auxiliary_weapon_slot_1 = light_mg_4x
				engine_type_slot = engine_2_1x
				special_type_slot_1 = lmg_defense_turret_2x
			}
		}
	}
}


set_convoys = 10

set_politics = {
	ruling_party = neutrality
	last_election = "1935.9.8"
	election_frequency = 36
	elections_allowed = no
}
set_popularities = {
	democratic = 32
	fascism = 11
	communism = 19
	neutrality = 38
}

1939.1.1 = {
	set_popularities = {
		democratic = 13
		fascism = 7
		communism = 2
		neutrality = 78
	}
}

recruit_character = POL_ignacy_moscicki
recruit_character = POL_wladyslaw_sikorski
recruit_character = POL_boleslaw_wieniawa_glugoszowski
recruit_character = POL_wladyslaw_gomulka
recruit_character = POL_maria_koszutska
recruit_character = POL_stanislaw_mikolajczyk
recruit_character = POL_wincenty_witos
recruit_character = POL_wladyslaw_raczkiewicz
recruit_character = POL_boleslaw_piasecki
recruit_character = POL_edward_rydzsmigly
recruit_character = POL_wladyslaw_bortnowski
recruit_character = POL_stanislaw_kopanski
recruit_character = POL_marian_kukiel
recruit_character = POL_jozef_haller
recruit_character = POL_stanislaw_sosabowski
recruit_character = POL_lucjan_zeligowski
recruit_character = POL_kazimierz_sosnkowski
recruit_character = POL_tadeusz_kutrzeba
recruit_character = POL_wladyslaw_anders
recruit_character = POL_roman_abraham
recruit_character = POL_wincenty_kowalski
recruit_character = POL_stefan_frankowski
recruit_character = POL_karol_korytowski
recruit_character = POL_jozef_unrug
recruit_character = POL_xawery_czernicki
recruit_character = POL_jozef_zajac
recruit_character = POL_ludomil_rayski
recruit_character = POL_stanislaw_pawluc
recruit_character = POL_stanislav_maczek
recruit_character = POL_wladyslaw_kalkus
recruit_character = POL_kazimierz_switalski
recruit_character = POL_wanda_wasilewska
recruit_character = POL_tomislaw_lupaszko
recruit_character = POL_zygmunt_buhusz_szysko
recruit_character = POL_roman_dmowski
recruit_character = POL_witold_pilecki
recruit_character = POL_irena_anders
recruit_character = POL_mieczyslaw_michalowicz
recruit_character = POL_boleslaw_bierut
recruit_character = POL_edward_osobka_morawski
recruit_character = POL_jozef_beck
recruit_character = POL_zdzislaw_lubomirski
recruit_character = POL_aleksander_kakowski
recruit_character = POL_stanislaw_radkiewicz
recruit_character = POL_jan_kowalewski
recruit_character = POL_eugeniusz_kwiatkowiski
recruit_character = POL_marian_rejewski
recruit_character = POL_jerzy_rutkowski
recruit_character = POL_karl_albrecht
recruit_character = POL_pavel_bermondt_avalov
recruit_character = POL_anna_andersson
recruit_character = POL_friedrich_christian
recruit_character = POL_rudinger_von_der_goltz
recruit_character = POL_vladislav_korchits
recruit_character = POL_wojtek

if = {
	limit = {
		OR = {
			has_dlc = "No Step Back"
			has_dlc = "Poland: United and Ready"
		}
	}
	recruit_character = POL_walery_slawek
	recruit_character = POL_jan_mosdorf
	recruit_character = POL_tadeusz_bielecki
	recruit_character = POL_joachim_stefan_bartoszewicz
	recruit_character = POL_stanislaw_wojciechowski
}

if = {
	limit = {
		has_dlc = "No Step Back"
	}
	recruit_character = POL_henryk_floyar_rajchman
	recruit_character = POL_sejmik_regency
}
if = {
	limit = {
		has_dlc = "Gotterdammerung"
	}
	recruit_character = POL_jan_zumbach
}

if = {
	limit = {
		has_dlc = "La Resistance"
	}
	create_operative_leader = {
		name = POL_roman_czerniawsi
		GFX = GFX_portrait_roman_czerniawski
		traits = { }
		bypass_recruitment = no
		available_to_spy_master = yes
		nationalities = { POL }
	}

	create_operative_leader = {
		name = POL_krystyna_skarbek
		GFX = GFX_portrait_krystyna_skarbek
		traits = { operative_commando operative_seducer }
		bypass_recruitment = no
		available_to_spy_master = yes
		female = yes
		nationalities = { POL }
	}
}

if = {
	limit = {
		NOT = {
			has_dlc = "By Blood Alone"
		}
	}
	create_equipment_variant = {
		name = "PZL P.24"
		type = fighter_equipment_0
		upgrades = {
			plane_gun_upgrade = 3
			plane_range_upgrade = 0  
			plane_engine_upgrade = 1
			plane_reliability_upgrade = 3
		}
	}
}
if = {
	limit = {
		has_dlc = "By Blood Alone"
	}
	create_equipment_variant = {
		name = "PZL P.11"
		type = small_plane_airframe_0
		modules = {
			fixed_main_weapon_slot = light_mg_4x
			engine_type_slot = engine_1_1x
			special_type_slot_1 = empty
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "PZL P.24"
		type = small_plane_airframe_0
		modules = {
			fixed_main_weapon_slot = aircraft_cannon_1_2x
			fixed_auxiliary_weapon_slot_1 = light_mg_2x
			engine_type_slot = engine_2_1x
			special_type_slot_1 = empty
		}
	}
	create_equipment_variant = {
		name = "PZL P.23"
		type = small_plane_cas_airframe_1
		modules = {
			fixed_main_weapon_slot = bomb_locks
			engine_type_slot = engine_1_1x
			special_type_slot_1 = lmg_defense_turret
		}
	}
}

### VARIANTS ###
# 1936 Start #
if = {
	limit = {
		has_dlc = "No Step Back"
	}

	IF = {
		limit = { has_dlc = "Poland: United and Ready"} 

		create_equipment_variant = {
			name = "TKS"
			type = light_tank_chassis_0
			parent_version = 0
			modules = {
				main_armament_slot = tank_heavy_machine_gun
				turret_type_slot = tank_light_fixed_superstructure_turret
				suspension_type_slot = tank_bogie_suspension
				armor_type_slot = tank_riveted_armor
				engine_type_slot = tank_gasoline_engine
			}
			upgrades = {
				tank_nsb_armor_upgrade = 1
				tank_nsb_engine_upgrade = 1
			}
			obsolete = yes #used for oob
			icon = "GFX_POL_basic_light_tank_medium"
		}
		create_equipment_variant = {
			name = "7TP dw"
			type = light_tank_chassis_0
			parent_version = 1
			modules = {
				main_armament_slot = tank_heavy_machine_gun
				turret_type_slot = tank_light_one_man_tank_turret
				suspension_type_slot = tank_bogie_suspension
				armor_type_slot = tank_riveted_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = secondary_turret_hmg
			}
			upgrades = {
				tank_nsb_armor_upgrade = 2
				tank_nsb_engine_upgrade = 2
			}
			icon = "GFX_POL_improved_light_tank_medium"
		}
		create_equipment_variant = {
			name = "7TP jw"
			type = light_tank_chassis_0
			parent_version = 2
			modules = {
				main_armament_slot = tank_high_velocity_cannon
				turret_type_slot = tank_light_two_man_tank_turret
				suspension_type_slot = tank_bogie_suspension
				armor_type_slot = tank_riveted_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = empty
			}
			upgrades = {
				tank_nsb_armor_upgrade = 2
				tank_nsb_engine_upgrade = 2
			}
			icon = "GFX_POL_improved_light_tank_medium"
		}
	}

	ELSE = {
		create_equipment_variant = {
			name = "TKS"
			type = light_tank_chassis_0
			parent_version = 0
			modules = {
				main_armament_slot = tank_heavy_machine_gun
				turret_type_slot = tank_light_fixed_superstructure_turret
				suspension_type_slot = tank_bogie_suspension
				armor_type_slot = tank_riveted_armor
				engine_type_slot = tank_gasoline_engine
			}
			upgrades = {
				tank_nsb_armor_upgrade = 1
				tank_nsb_engine_upgrade = 1
			}
			obsolete = yes #used for oob
		}
		create_equipment_variant = {
			name = "7TP dw"
			type = light_tank_chassis_0
			parent_version = 1
			modules = {
				main_armament_slot = tank_heavy_machine_gun
				turret_type_slot = tank_light_one_man_tank_turret
				suspension_type_slot = tank_bogie_suspension
				armor_type_slot = tank_riveted_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = secondary_turret_hmg
			}
			upgrades = {
				tank_nsb_armor_upgrade = 2
				tank_nsb_engine_upgrade = 2
			}
		}
		create_equipment_variant = {
			name = "7TP jw"
			type = light_tank_chassis_0
			parent_version = 2
			modules = {
				main_armament_slot = tank_high_velocity_cannon
				turret_type_slot = tank_light_two_man_tank_turret
				suspension_type_slot = tank_bogie_suspension
				armor_type_slot = tank_riveted_armor
				engine_type_slot = tank_diesel_engine
				special_type_slot_1 = empty
			}
			upgrades = {
				tank_nsb_armor_upgrade = 2
				tank_nsb_engine_upgrade = 2
			}
		}
	}
#	add_equipment_to_stockpile = {
#		type = light_tank_chassis_0
#		amount = 550
#		variant_name = "TKS"
#	}
}
if = {
	limit = { not = { has_dlc = "Man the Guns" } }
	### Ship Variants ###
}
if = {
	limit = { has_dlc = "Man the Guns" }
	# Submarines #
	create_equipment_variant = {
		name = "Wilk Class"				
		type = ship_hull_submarine_2
		name_group = POL_SS_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_torpedo_slot = ship_torpedo_sub_1
			fixed_ship_engine_slot = sub_ship_engine_1
			rear_1_custom_slot = ship_mine_layer_sub
		}
	}
	# Destroyers #
	create_equipment_variant = {
		name = "Wicher Class"				
		type = ship_hull_light_1
		name_group = POL_DD_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = light_ship_engine_1
			fixed_ship_torpedo_slot = ship_torpedo_1
			mid_1_custom_slot = ship_mine_layer_1
			rear_1_custom_slot = ship_depth_charge_1
		}
	}
}


# 1939 Start #
1939.1.1 = {
	if = {
		limit = { not = { has_dlc = "Man the Guns" } }
		# Ship variants #
	}
	if = {
		limit = { has_dlc = "Man the Guns" }
		# Submarines #
		create_equipment_variant = {
			name = "Orzel Class"				
			type = ship_hull_submarine_2
			name_group = POL_SS_HISTORICAL
			parent_version = 0
			modules = {
				fixed_ship_torpedo_slot = ship_torpedo_sub_2
				fixed_ship_engine_slot = sub_ship_engine_2
				rear_1_custom_slot = ship_torpedo_sub_2
			}
		}
		# Destroyers #
		create_equipment_variant = {
			name = "Grom Class"					
			type = ship_hull_light_2
			name_group = POL_DD_HISTORICAL
			parent_version = 0
			modules = {
				fixed_ship_battery_slot = ship_light_battery_2
				fixed_ship_anti_air_slot = ship_anti_air_1
				fixed_ship_fire_control_system_slot = ship_fire_control_system_0
				fixed_ship_radar_slot = empty
				fixed_ship_engine_slot = light_ship_engine_2
				fixed_ship_torpedo_slot = ship_torpedo_1
				mid_1_custom_slot = ship_mine_layer_1
				rear_1_custom_slot = ship_depth_charge_1
			}
		}
		create_equipment_variant = {
			name = "Gryf Class"						# minelaying craft
			type = ship_hull_light_2
			parent_version = 0
			modules = {
				fixed_ship_battery_slot = ship_light_battery_2
				fixed_ship_anti_air_slot = ship_anti_air_1
				fixed_ship_fire_control_system_slot = ship_fire_control_system_0
				fixed_ship_radar_slot = empty
				fixed_ship_engine_slot = light_ship_engine_1
				fixed_ship_torpedo_slot = empty
				mid_1_custom_slot = ship_mine_layer_1
				rear_1_custom_slot = ship_mine_layer_1
			}
		}
	}
}
